<div class="ui-g">
    <div class="ui-g-3 notice-navagator" style="height: 100%;">
        <div id="paginator" class="notice-navagator-footer" >
            <p-paginator [rows]="15" [totalRecords]="totalRecords" (onPageChange)="loadNoticeList($event)"></p-paginator>
        </div>
        <div class="ui-g-12 notice-navagator-search">
            <div class="ui-inputgroup" (keydown)="enterOnkeydown($event)">
                <input type="text" pInputText placeholder="请输入标题" [(ngModel)]="title" style="width:85%">
                <span class="ui-inputgroup-addon" (click)="searchByTitle(title)">
                <i class="fa fa-search" aria-hidden="true"></i>
              </span>
            </div>
        </div>
        <div class="ui-g-12" style="text-align: right;border-bottom: 1px solid #8d8d8d;">
            <button pButton class="ui-button-dnager" type="button" icon="fa fa-plus" label="新增通知公告" (click)="addNotice()"></button>
        </div>
        <div class="ui-g-12 notice-navagator-list" style="height: calc(100% - 120px);">
            <p *ngIf="isShow" style="text-align: center;">暂无公告</p>
            <div *ngFor="let publish of publishList" class="ui-g-12 receive-list" [ngStyle]="publish.style" (click)="readNotice(publish)">
                <div class="ui-g-12" style="padding: 0px; height: 26px;">
                    <p-rating *ngIf="this.selectNotice.noticeId != publish.noticeId" [(ngModel)]="publish.grade" readonly="true" stars="5" [cancel]="false"></p-rating>
                </div>
                <div class="ui-g-12" style="text-align: center;">
                    {{publish.title}}
                </div>
                <div class="ui-g-12" style="text-align: right;padding: 0px;padding-right: 1em;">
                    <span>{{publish.createTime}}</span>
                    <span style="margin-left: 2em;">{{publish.publishUnit}}</span>
                </div>
            </div>
        </div>
    </div>
    <div class="ui-g-9 notice-content">
        <div class="ui-g-12" style="height: 100%;padding: 0px">
            <button *ngIf="!isShow" pButton class="ui-button-danger" type="button" icon="fa fa-trash" label="删除" (click)="deleteNotice()" style="position: relative; float: right; margin-right: 20px; margin-top: 15px;"></button>
            <button *ngIf="!isShow" pButton class="ui-button-warning" type="button" icon="fa fa-edit" label="编辑" (click)="editNotice()" style="position: relative; float: right; margin-right: 20px; margin-top: 15px;"></button>
            <p-editor [(ngModel)]="text" [style]="{'height': 'calc(100% - 60px)'}" [readonly]="true">
                <p-header></p-header>
            </p-editor>
        </div>
        <div *ngIf="urlList.length > 0" class="ui-g-12" style="height: 60px;width:64%;overflow-x: auto;position: absolute;bottom: 0px;">
            <h6>附件</h6>
            <a *ngFor="let list of urlList" class="fa fa-file" (click)="download(list)" style="margin-right: 2em;text-decoration: underline;cursor:pointer;">&nbsp;{{list.mediaName}}</a>
        </div>
    </div>
</div>
<p-confirmDialog #cd>
    <p-footer>
        <button type="button" pButton icon="fa fa-close" label="取消" (click)="cd.reject()"></button>
        <button type="button" pButton icon="fa fa-check" label="确定" (click)="cd.accept()"></button>
    </p-footer>
</p-confirmDialog>
